﻿using ApplicationBase.Core.Context;
using MediatR;
using System.Text.Json.Serialization;

namespace ApplicationBase.Core.Command
{
    public class BaseCommand<TResponse> : IRequest<TResponse>
    {
        public bool UseTransaction { get; set; }
        
        [JsonIgnore]
        public IServiceContext? ServiceContext { get; set; }

        public BaseCommand() 
        {
            UseTransaction = true;
        }
    }
}
